package cn.itheima.taotao.controller;

import cn.itheima.taotao.content.service.ContentCategorytService;
import cn.itheima.taotao.domain.EasyUITreeNode;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator .
 */
@Controller
public class ContentCategorytController {

    @Resource
    private ContentCategorytService contentCategorytService;

    @RequestMapping("/content/category/list")
    @ResponseBody
    public List<EasyUITreeNode> getContentCatList(@RequestParam(defaultValue = "0") long id) {
        List<EasyUITreeNode> contentCatList = contentCategorytService.getContentCatList(id);
        return contentCatList;
    }
}
